<!-- 具体页面后台传回,后天编辑 -->
<template>
	<view class="shop">
		<view style="height: 40rpx;width: 750rpx;background-color: #fff;"></view>
		<!-- 顶部 -->
		<view class="top">
			<view class="back" @click="$win.back()">
				<view>
					<image src="/static/iconfont/arrow-left-bold.png" mode="aspectFill"></image>
				</view>
				<text>{{title}}</text>
			</view>
		</view>

		<!-- 商品信息 -->
		<view class="goodsMsg">
			<image class="goodPic" src="/static/user/goods.png" mode="aspectFill"></image>
			<view class="miaosha" v-if="isMiaosha">
				<image src="/static/images/background/goods/miaoshaBg.png" mode="aspectFill"></image>
				<view class="price">
					<text>抢购价</text>
					<view class="num">
						￥<text>11000.00</text>
					</view>
				</view>
				<view class="countdown">
					<text>距离结束</text>
					<view class="time">16:46:56</view>
				</view>
			</view>
			<view class="msg">
				<view class="share">
					<image src="/static/images/icon/study/shunxu/share.png" mode="aspectFill"></image>
					<text>分享</text>
				</view>

				<view class="price">
					<text class="t1" v-show="!isMiaosha">￥<text>12000.00</text> </text>
					<text class="t2">享12期免息，可免2490.00元，每期1000.00(每日33.33)</text>
				</view>
				<view class="name">
					<text class="t1">专车空调全包班</text>
					<text class="t2">三人一车/考前模拟/免费重学/周末练车</text>
				</view>
			</view>
		</view>

		<!-- 详情 -->
		<view class="detailed">
			<view class="title">
				<view>
					<text>详细</text>
				</view>
			</view>
			<view class="richText">
				富文本区域
			</view>
		</view>

		<!-- 固定栏 -->
		<view class="footer">
			<view class="option" @click="toIndex()">
				<image src="/static/images/icon/shop/index.webp" mode="aspectFill"></image>
				<text>首页</text>
			</view>
			<view class="option">
				<image src="/static/images/icon/shop/customerService.webp" mode="aspectFill"></image>
				<text>客服</text>
			</view>
			<button class="btn">立即报名</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isMiaosha: false,
				title: '商品页',
			}
		},
		methods: {
			toIndex() {
				uni.switchTab({
					url: '/pages/index/index'
				})
			}
		},
		onLoad(option) {
			// this.title=option.title
		}
	}
</script>

<style lang="scss">
	.shop {
		background-color: #f2f3f5;
		height: 100vh;
	}

	.top {
		display: flex;
		flex-direction: row;
		align-items: center;
		width: 750rpx;
		height: 88rpx;
		background: #ffffff;

		.back {
			display: flex;
			flex-direction: row;
			align-items: center;

			view {
				display: flex;
				align-items: center;
				justify-content: center;
				width: 88rpx;
				height: 88rpx;

				image {
					width: 20rpx;
					height: 34rpx;
				}
			}

			text {
				height: 34rpx;
				line-height: 34rpx;
				font-size: 34rpx;
				font-family: Source Han Sans CN, Source Han Sans CN-Regular;
				font-weight: 400;
				text-align: left;
				color: #333333;
			}
		}
	}

	.goodsMsg {
		display: flex;
		flex-direction: column;
		// height: 644rpx;
		width: 750rpx;

		.goodPic {
			width: 750rpx;
			height: 394rpx;
		}

		.miaosha {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			box-sizing: border-box;
			position: relative;
			width: 750rpx;
			height: 108rpx;
			padding: 0 27rpx;

			// background-color: pink;
			image {
				position: absolute;
				top: 0;
				left: 0;
				width: 750rpx;
				height: 108rpx;
			}

			.price {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				box-sizing: border-box;
				padding: 17rpx 0;
				height: 100%;
				z-index: 2;

				text {
					font-size: 24rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Regular;
					font-weight: 400;
					text-align: left;
					color: #ffffff;
				}

				.num {
					font-size: 28rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Regular;
					font-weight: 400;
					text-align: left;
					color: #ffffff;

					text {
						font-size: 40rpx;
						font-weight: 500;
						color: #ffffff;
					}
				}
			}

			.countdown {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				box-sizing: border-box;
				align-items: center;
				padding: 17rpx 0;
				height: 100%;
				z-index: 2;

				text {
					width: 116rpx;
					height: 30rpx;
					line-height: 30rpx;
					background: #f93030;
					border-radius: 15rpx;
					font-size: 22rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Regular;
					font-weight: 400;
					text-align: center;
					color: #ffffff;
				}

				.time {
					font-size: 32rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Regular;
					font-weight: 400;
					text-align: center;
					color: #f93030;
				}
			}
		}

		.msg {
			display: flex;
			flex-direction: column;
			justify-content: space-around;
			position: relative;
			width: 750rpx;
			// height: 250rpx;
			background: #ffffff;
			box-sizing: border-box;

			// padding: 30rpx 24rpx;
			.share {
				position: absolute;
				right: 0;
				bottom: 60rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				width: 110rpx;
				height: 40rpx;
				background: #eff0f2;
				border-radius: 20rpx 0rpx 0rpx 20rpx;
				box-sizing: border-box;

				image {
					width: 22rpx;
					height: 24rpx;
					margin-right: 14rpx;
				}

				text {
					font-size: 24rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Regular;
					font-weight: 400;
					text-align: left;
					color: #333333;
				}
			}



			.price {
				position: relative;
				display: flex;
				flex-direction: column;
				margin: 15rpx 24rpx;

				text {
					color: #f93030;
				}

				.t1 {
					font-size: 28rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Regular;
					font-weight: 400;
					text-align: left;
					color: #f93030;

					text {
						// margin-left: ;
						font-size: 40rpx;
						font-weight: 500;
					}
				}

				.t2 {
					margin-top: 10rpx;
					font-size: 24rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Regular;
					font-weight: 400;
					text-align: left;
				}
			}

			.name {
				display: flex;
				flex-direction: column;
				margin: 15rpx 24rpx;

				.t1 {
					font-size: 32rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Medium;
					font-weight: 500;
					text-align: left;
					color: #333333;
				}

				.t2 {
					margin-top: 10rpx;
					font-size: 24rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Regular;
					font-weight: 400;
					text-align: left;
					color: #999999;
				}
			}
		}
	}

	.detailed {
		display: flex;
		flex-direction: column;
		align-items: center;

		.title {

			display: flex;
			align-items: center;
			justify-content: center;
			height: 74rpx;
			width: 750rpx;

			view {
				position: relative;
				height: 24rpx;
				width: 48rpx;

				text {
					height: 24rpx;
					line-height: 24rpx;
					font-size: 24rpx;
					font-family: Source Han Sans CN, Source Han Sans CN-Regular;
					font-weight: 400;
					text-align: center;
					color: #666666;
				}

				&:after {
					position: absolute;
					right: -57rpx;
					top: 19rpx;
					content: '';
					width: 50rpx;
					height: 2rpx;
					background: #c7c7c7;
				}

				&:before {
					position: absolute;
					left: -57rpx;
					top: 19rpx;
					content: '';
					width: 50rpx;
					height: 2rpx;
					background: #c7c7c7;
				}
			}
		}

		.richText {
			display: flex;
			flex-direction: column;
			// width: 750rpx;
			// height: 80rpx;
			background-color: #ffffff;
		}
	}


	/* footer部分start */
	.footer {
		display: flex;
		align-items: center;
		justify-content: space-around;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 750rpx;
		height: 98rpx;
		box-sizing: border-box;
		padding: 0 24rpx;
		background: #ffffff;

		.option {
			display: flex;
			flex-direction: column;
			align-items: center;

			image {
				width: 50rpx;
				height: 50rpx;
				// background-color: skyblue;
			}

			text {
				margin-top: 6rpx;
				font-size: 24rpx;
				font-family: Source Han Sans CN, Source Han Sans CN-Regular;
				font-weight: 400;
				text-align: left;
				color: #666666;
			}
		}

		.btn {
			margin: 0;
			width: 440rpx;
			height: 68rpx;
			background: linear-gradient(134deg, #54d685, #29c563 99%);
			border-radius: 34rpx;
			font-size: 28rpx;
			font-family: Source Han Sans CN, Source Han Sans CN-Regular;
			font-weight: 400;
			text-align: center;
			color: #ffffff;
		}
	}

	/* footer部分end */
</style>
